home *** CD-ROM | disk | FTP | other *** search
- global gInterfaceLanguage, gScreenStatus, gReturnDialog, gHighLightPos, gFlushDialogEvent, gFreeSprite, gTransitionType, gTransitionSize, gEditeur
-
- on ShowQuit
- global gPrgKey
- if gPrgKey = 2 then
- set gPrgKey to gPrgKey + 1
- else
- set gPrgKey to -10
- end if
- set TempList to []
- repeat with n = 1 to 48
- add(TempList, the cursor of sprite n)
- set the cursor of sprite n to 4
- end repeat
- watchCursor()
- ResetNavigPopUp()
- if (gScreenStatus = #ILLUSTRATION) or (gScreenStatus = #REGION) or (gScreenStatus = #ZOOM) then
- FlushAllAnimationsData()
- ResetActiveLabels()
- ResetScreenLists()
- EraseAll()
- end if
- set gReturnDialog to gScreenStatus
- GrabStage()
- addRAMobjects(#CastList, [10567, 10570, 10571])
- set the text of field 10567 to getString(#QUITLINE1, gInterfaceLanguage)
- set the text of field 10574 to getString(#QUITLINE2, gInterfaceLanguage)
- set the text of field 10571 to getString(#CANCEL, gInterfaceLanguage)
- set the text of cast 10570 to getString(#ok, gInterfaceLanguage)
- set locvsprite5 to 48
- set largeursprite8 to 180
- if gInterfaceLanguage = 1 then
- set lochsprite5 to 36
- set lochsprite8 to 150
- else
- if gInterfaceLanguage = 2 then
- set lochsprite5 to 51
- set lochsprite8 to 134
- else
- if gInterfaceLanguage = 3 then
- set lochsprite5 to 64
- set lochsprite8 to 144
- end if
- end if
- end if
- repeat with i = 1 to 46
- set the visible of sprite i to 1
- end repeat
- set the visible of sprite 5 to 0
- set the visible of sprite 8 to 0
- set the visible of sprite 30 to 0
- puppetTransition(9, 0, 5)
- gotoframe(10)
- set X1 to the locH of sprite 2 - getAt(the regPoint of cast 10529, 1)
- set Y1 to the locV of sprite 2 - getAt(the regPoint of cast 10529, 2)
- set the locH of sprite 5 to X1 + lochsprite5
- set the locV of sprite 5 to Y1 + locvsprite5
- set the locH of sprite 8 to X1 + lochsprite8
- set the locV of sprite 8 to the locV of sprite 5 + 13
- set the width of sprite 8 to largeursprite8
- set the visible of sprite 5 to 1
- set the visible of sprite 8 to 1
- set gScreenStatus to #quit
- puppetTransition(0)
- updateStage()
- repeat with n = 1 to 48
- set the cursor of sprite n to getAt(TempList, n)
- end repeat
- cursor(-1)
- set the cursor of sprite 2 to 0
- set the cursor of sprite 5 to 0
- set the cursor of sprite 8 to 0
- SpriteHandCursor(3)
- SpriteHandCursor(4)
- SpriteHandCursor(6)
- SpriteHandCursor(7)
- SpriteHandCursor(30)
- SpriteHandCursor(31)
- end
-
- on CancelQuit
- watchCursor()
- GrabStage(0)
- set gFreeSprite to 48
- ReCreateScreen(gReturnDialog, 1)
- ClearCursor()
- end
-
- on KeyDownQuit
- if the machineType = 256 then
- if the visible of sprite 30 = 1 then
- set BoutonOn to 1
- else
- set BoutonOn to 0
- end if
- if the keyCode = 48 then
- if BoutonOn = 0 then
- ActiveButton(1)
- else
- ActiveButton(2)
- end if
- end if
- if (the key = RETURN) or (the key = ENTER) then
- if gReturnDialog = #HISTORY then
- set gFlushDialogEvent to 1
- end if
- if BoutonOn = 0 then
- flashButton(3)
- QuitMovie()
- else
- flashButton(4)
- CancelQuit()
- end if
- dontPassEvent()
- abort()
- end if
- else
- if (the key = RETURN) or (the key = ENTER) then
- flashButton(3)
- QuitMovie()
- end if
- if the commandDown and (the key = ".") then
- flashButton(4)
- CancelQuit()
- end if
- end if
- dontPassEvent()
- abort()
- end
-
- on ShowCredit
- global gPrgKey
- watchCursor()
- if gPrgKey = 3 then
- set gPrgKey to gPrgKey + 1
- else
- set gPrgKey to -10
- end if
- set gReturnDialog to gScreenStatus
- set gScreenStatus to #CREDIT
- FlushAllAnimationsData()
- if (gScreenStatus = #ILLUSTRATION) or (gScreenStatus = #ZOOM) or (gScreenStatus = #REGION) then
- ResetActiveLabels()
- ResetScreenLists()
- end if
- GrabStage(0)
- gotoframe(25, 0)
- set FirstCreditScrn to 10583
- addRAMobjects(#CastList, [10582, FirstCreditScrn])
- set the castNum of sprite 1 to 10582
- set the locH of sprite 1 to 320
- set the locV of sprite 1 to 240
- set the castNum of sprite 2 to FirstCreditScrn
- set the ink of sprite 2 to 36
- setCreditPosition()
- puppetTransition(gTransitionType, 0, gTransitionSize)
- updateStage()
- puppetTransition(0)
- handCursor()
- end
-
- on CreditEvent
- if the castType of cast (the castNum of sprite 2 + 1) <> #empty then
- set TempNum to the castNum of sprite 2 + 1
- addRAMobjects(#CastList, [TempNum])
- set the castNum of sprite 2 to TempNum
- setCreditPosition()
- if the castType of cast (TempNum + 1) = #empty then
- set the ink of sprite 2 to 0
- end if
- puppetTransition(gTransitionType, 0, gTransitionSize)
- updateStage()
- puppetTransition(0)
- else
- watchCursor()
- GrabStage(0)
- set gFreeSprite to 48
- ReCreateScreen(gReturnDialog)
- ClearCursor()
- end if
- end
-
- on CloseCredit
- watchCursor()
- GrabStage(0)
- set gFreeSprite to 48
- ReCreateScreen(gReturnDialog)
- ClearCursor()
- end
-
- on setCreditPosition
- set theCastName to the name of cast the castNum of sprite 2
- set posTemp to value(chars(theCastName, offset("(", theCastName) + 1, offset(",", theCastName) - 1))
- set the locH of sprite 2 to posTemp + (the width of cast the castNum of sprite 2 / 2)
- set posTemp to value(chars(theCastName, offset(",", theCastName) + 1, offset(")", theCastName) - 1))
- set the locV of sprite 2 to posTemp + (the height of cast the castNum of sprite 2 / 2)
- end
-